# Maps API MapOptions Object

Map() Constructor

## Example

Specify properties/options for a map:

var mapOpt = {
center:new google.maps.LatLng(51.508742,-0.120850),
zoom:5,
mapTypeId:google.maps.MapTypeId.ROADMAP
};
Try it yourself »

## Definition and Usage

The MapOptions object holds the map initialization variables/options.

## Syntax

var mapOpt = {
property:value,
property:value,
etc.
};

## Properties of MapOptions

Property | Type | Description
--- | --- | ---
backgroundColor | string | Specifies a background color for the Map <div>
center | LatLng | Required. Specifies the default map center
disableDefaultUI | boolean | Enables/Disables all default controls
disableDoubleClickZoom | boolean | Enables/Disables zoom and center on double-click
draggable | boolean | False prevents the map from being dragged. Default is true
draggableCursor | string | Specifies the name/URL of the cursor to display on a draggable object
draggingCursor | string | Specifies the name/URL of the cursor to display when an object is dragging
heading | number | Specifies the heading for aerial imagery in degrees
keyboardShortcuts | boolean | False prevents the map from being controlled by the keybord. Default is true
mapMaker | boolean | True if Map Maker tiles should be used instead of regular tiles
mapTypeControl | boolean | Specifies the default enabled/disabled state of the Map type control
mapTypeControlOptions | MapTypeControlOptions | The default display options for the Map type control
mapTypeId | MapTypeId | Required. The default map type
maxZoom | number | The maximum zoom level for the map
minZoom | number | The minimum zoom level for the map
noClear | boolean | If true, do not clear the contents of the Map <div>
overviewMapControl | boolean | The enabled/disabled state of the Overview Map control
overviewMapControlOptions | OverviewMapControlOptions | The display options for the Overview Map control
panControl | boolean | The enabled/disabled state of the Pan control
panControlOptions | PanControlOptions | The display options for the Pan control
rotateControl | boolean | The enabled/disabled state of the Rotate control
rotateControlOptions | RotateControlOptions | The display options for the Rotate control
scaleControl | boolean | The default enabled/disabled state of the Scale control
scaleControlOptions | ScaleControlOptions | The default display options for the Scale control
scrollwheel | boolean | False disables scrollwheel zooming on the map. Default is true
streetView | StreetViewPanorama | A StreetViewPanorama to display when the Street View pegman is dropped on the map
streetViewControl | boolean | The default enabled/disabled state of the Street View Pegman control
streetViewControlOptions | StreetViewControlOptions | The default display options for the Street View Pegman control
styles | Array.<MapStyleType> | Styles to apply to each of the default map types
tilt | number | The angle of incidence of the map as measured in degrees from the viewport plane to the map plane (0 and 45)
zoom | number | Required. The default Map zoom level
zoomControl | boolean | The enabled/disabled state of the Zoom control
zoomControlOptions | ZoomControlOptions | The display options for the Zoom control

Map() Constructor

### WEB HOSTING

UK Reseller Hosting

### WEB BUILDING

FREE Website BUILDER Free HTML5 Templates

### W3SCHOOLS EXAMS

HTML, CSS, JavaScript, PHP, jQuery, XML, and ASP Certifications

### SHARE THIS PAGE

### Color Picker

### HTML/CSS

HTML Tutorial HTML5 Tutorial CSS Tutorial CSS3 Tutorial Bootstrap Tutorial

### JavaScript

JavaScript Tutorial jQuery Tutorial jQuery Mobile Tutorial AngularJS Tutorial AJAX Tutorial JSON Tutorial

### Graphics

Canvas Tutorial SVG Tutorial Google Maps Tutorial

### Server Side

SQL Tutorial PHP Tutorial ASP Tutorial ASP.NET Tutorial VBScript Tutorial AppML Tutorial

### Web

Web Building Web Statistics Web Certification

### XML

XML Tutorial DTD Tutorial Schema Tutorial XML DOM Tutorial XPath Tutorial XSLT Tutorial XQuery Tutorial XSL-FO Tutorial RSS Tutorial WSDL Tutorial

### HTML/CSS

HTML Tag Reference HTML Event Reference HTML Color Reference CSS 1,2,3 Reference Bootstrap Reference

### JavaScript

JavaScript Reference HTML DOM Reference jQuery Reference jQuery Mobile Reference Google Maps Reference

### Server Side

PHP Reference SQL Reference ASP Reference VBScript Reference Razor Reference ASP.NET Reference

### XML

XML DOM Reference XSLT Reference XSL-FO Reference XPath Reference XQuery Reference Schema Reference RSS Reference SVG Reference

### HTML Charsets

HTML Character Sets HTML ASCII HTML ANSI HTML Windows-1252 HTML ISO-8859-1 HTML Symbols HTML UTF-8

### HTML/CSS

HTML Examples CSS Examples

### Browser Scripting

JavaScript Examples HTML DOM Examples jQuery Examples jQuery Mobile Examples AngularJS Examples AJAX Examples

### Server Scripting

PHP Examples ASP Examples VBScript Examples Razor Examples .NET Examples

### XML Languages

XML Examples DTD Examples XML DOM Examples XSL Examples XSLT Examples XPath Examples XQuery Examples Schema Examples RSS Examples SVG Examples